<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
     <div>
         <span>1</span>
         <span>2</span>
         <span>3</span>
         <span>4</span>
     </div>
</body>

<style>
    div{
        /*给父级添加flex属性 */
        display: flex;
        width: 800px;
        height: 300px;
        background-color: rgba(112, 220, 203, 0.4);
        /* 默认的主轴是 x 轴 行row  那么y轴就是侧轴 */
        /* 我们的元素是跟着主轴来排列的 */
        /* 简单了解翻转 */
        /*flex-direction:row-reverse;*/
        /*flex-direction: row;*/
        /*我们可以把我们的主轴设置为 y轴 那么 x轴就成了侧轴*/
        flex-direction: column;
}
div span{
    width: 150px;
    height: 100px;
    background-color: #eea068;
}
</style>
</html>